package nc.appcan.bill.vo;

import java.util.HashMap;
import java.util.Map;


public class GeneralVO {
	private GeneralHeadVO  head;
	private  GeneralItemVO[] body;
	public GeneralHeadVO getHead() {
		return head;
	}
	public void setHead(GeneralHeadVO head) {
		this.head = head;
	}
	public GeneralItemVO[] getBody() {
		return body;
	}
	public void setBody(GeneralItemVO[] body) {
		this.body = body;
	}
	public String getCodes(){
		StringBuffer st = new StringBuffer();
		for(GeneralItemVO itemvo:this.body){
			st.append("'").append(itemvo.getBmemo()).append("'").append(",");
		}
		return st.substring(0, st.length()-1);
	}
	public Map<String ,GeneralItemVO> getBodyMap(){
		Map<String ,GeneralItemVO>  map = new HashMap<String,GeneralItemVO>();
		for(GeneralItemVO itemvo:this.body){
			map.put(itemvo.getBmemo(), itemvo);
		}
		return map;
	}
	

}